package controladores;

import com.example.rm.teste.R;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;


public class MainActivity extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		//NumberPicker np1 = (NumberPicker) findViewById(R.id.np1);
		//np1.setMinValue(40);
	//	np1.setMaxValue(300);
		//np1.setValue(120);
		//int valor1 = np1.getValue();
		EditText text1= (EditText)findViewById(R.id.editText2);
		text1.setText("120");
		//text1.setText(Integer.toString(valor1));
		

		
		//NumberPicker np2 = (NumberPicker) findViewById(R.id.np2);
		//np2.setMinValue(40);
//		np2.setMaxValue(300);
//		np2.setValue(80);
//		int valor2 = np2.getValue();
		EditText text2= (EditText)findViewById(R.id.editText3);
		text2.setText("80");
//		text2.setText(Integer.toString(valor2));
		
//		NumberPicker np3 = (NumberPicker) findViewById(R.id.np3);
//		np3.setMinValue(30);
//		np3.setMaxValue(200);
//		np3.setValue(65);
//		int valor3 = np3.getValue();
		EditText text3= (EditText)findViewById(R.id.editText4);
//		text3.setText(Integer.toString(valor3));
		text3.setText("65");

		
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	
	
	public void onClick(View v){
		
//		NumberPicker np1 = (NumberPicker) findViewById(R.id.np1);
//		int valor1 = np1.getValue();
//		EditText text1= (EditText)findViewById(R.id.editText2);
//		text1.setText(Integer.toString(valor1));
//		
//		NumberPicker np2 = (NumberPicker) findViewById(R.id.np2);
//		int valor2 = np2.getValue();
//		EditText text2= (EditText)findViewById(R.id.editText3);
//		text2.setText(Integer.toString(valor2));
//		
//		NumberPicker np3 = (NumberPicker) findViewById(R.id.np3);
//		int valor3 = np3.getValue();
//		EditText text3= (EditText)findViewById(R.id.editText4);
//		text3.setText(Integer.toString(valor3));

	}
	
	public void mudaEcra(View v){
		Intent intent = new Intent(getApplicationContext(), Resumo.class);
		startActivity(intent);
		
	}
	
	public void onClickBotaoData(View v){
		Intent intent = new Intent(getApplicationContext(), Data.class);
		startActivity(intent);
		
	}
	
	public void onClickBotaoHora(View v){
		Intent intent = new Intent(getApplicationContext(), Hora.class);
		startActivity(intent);
		
	}

	public void ecraCancelar(View v){
		Intent intent = new Intent(getApplicationContext(), MenuPrincipal.class);
		startActivity(intent);
		
	}
	
	
	
	
	
	
}
